EFK Stack
https://wsgzao.github.io/post/efk/#
ElasticSearch+Fluentd+Kibana 日志分析系统
云原生日志收集器
部署 Fluentd
- fluent/fluentd-kubernetes-daemonset: Fluentd 官方提供的 daemonset 部署方法,可以方便地通过环境变量配置 Fluentd.
- 用于日志存储与分析的 ElasticSearch/Kibana 请额外部署。
- 所有的环境变量:参见 fluentd-kubernetes-daemonset - fluent.conf
Fluentd「Bug」记录
- Fluentd 报错:
Worker 0 finished unexpectedly with signal SIGKILL
: 内存不足,增加resources.limits.memory
的值。
ElasticSearch + Kibana
参见 /database/elasticsearch/README.md
日志的常见分析手段
- 日志聚类:智能聚类可以让日志更清晰明了。
- 时序分析:某段时间日志激增?
- 交互式分析:关键字查询等,需要高效的搜索语法。